import [Value,Scope,Errors]

Symbol : class extends Value {
    name : String
    
    init : func~withoutLine (=name)
    init : func~withLine (=name,=line)
    
    equals? : func(other : Value) -> Bool {
        other class == This && other as This name == this name
    }
    
    toString : func -> String { name }
    
    evaluate : func(scope : Scope) -> Value {
        ret := scope[name]
        if(ret == null) {
            UndefinedError new (name,line) throw()
        }
        ret line = line
        ret
    }
    
    clone : func -> Value {
        return This new(name,line)
    }
}